/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.bomt.repository;

import com.comac.ins.bomt.common.enums.BizStepEnum;
import com.comac.ins.bomt.common.enums.BomInfoStatusEnum;
import com.comac.ins.bomt.domain.*;
import com.comac.ins.bomt.domain.vo.*;
import com.comac.ins.common.core.domain.model.LoginUser;

import java.util.List;

/**
 * Bom仓储
 * 原则上所有Bom相关的写操作均需要经过此层
 *
 * @author zhanghongyi
 * @date 2024 /8/13 11:10
 * @description BomRepository
 */
public interface BomRepository {
    /**
     * Init bom records list.
     *
     * @param loginUser     the login user
     * @param groupTypes    the group types
     * @param aircraftModel the aircraft model
     * @param batchNo       the batch no
     * @param fileVo        the file vo
     * @return the list
     */
    List<BomInfo> initBomRecords(LoginUser loginUser, List<String> groupTypes, String aircraftModel, String batchNo, BizFileVo fileVo);

    /**
     * Init standard bom detail list.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param details       the details
     * @return the list
     */
    List<DetailStandardBom> initStandardBomDetail(LoginUser loginUser, String aircraftModel, String track, String groupType, List<DetailStandardBomVo> details);

    /**
     * Init strength bom detail list.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param details       the details
     * @return the list
     */
    List<DetailStrengthBom> initStrengthBomDetail(LoginUser loginUser, String aircraftModel, String track, String groupType, List<DetailStrengthBom> details);

    /**
     * Init strength standard change detail list.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param changeVo      the change vo
     * @return the list
     */
    List<DetailStrengthStandardChange> initStrengthStandardChangeDetail(LoginUser loginUser, String aircraftModel, String track, String groupType, SummaryStrengthStandardChangeVo changeVo);

    /**
     * Init status strength change detail list.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param changeVo      the change vo
     * @return the list
     */
    List<DetailStatusStrengthChange> initStatusStrengthChangeDetail(LoginUser loginUser, String aircraftModel, String track, String groupType, SummaryStatusStrengthChangeVo changeVo);

    /**
     * Init model status detail list.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param details       the details
     * @return the list
     */
    List<DetailModelStatus> initModelStatusDetail(LoginUser loginUser, String aircraftModel, String track, String groupType, List<DetailModelStatus> details);

    /**
     * 更新业务步骤和状态
     *
     * @param bizStep       the biz step
     * @param bomInfoStatus the bom info status
     * @param ids           the ids
     */
    void updateBomWithBizStepAndStatus(BizStepEnum bizStep, BomInfoStatusEnum bomInfoStatus, List<Long> ids);

    /**
     * Batch update bom.
     *
     * @param bomInfos the bom infos
     */
    void batchUpdateBom(List<BomInfo> bomInfos);

    /**
     * Update strength detail comment by standard detail.
     *
     * @param standardBomDetail the standard bom detail
     * @param comment           the comment
     */
    void updateStrengthDetailCommentByStandardDetail(DetailStandardBom standardBomDetail, String comment);

    /**
     * Update bom info.
     *
     * @param bomInfo the bom info
     */
    void updateBomInfo(BomInfo bomInfo);

    /**
     * 删除
     *
     * @param deleteIds the delete ids
     */
    void deleteStandardBomDetails(List<Long> deleteIds);

    /**
     * Delete strength bom details.
     *
     * @param deleteIds the delete ids
     */
    void deleteStrengthBomDetails(List<Long> deleteIds);

    /**
     * Modify strength bom details.
     *
     * @param modifyDetails the modify details
     */
    void modifyStrengthBomDetails(List<DetailStrengthBomVo> modifyDetails);

    /**
     * Modify standard bom details.
     *
     * @param modifyDetails the modify details
     */
    void modifyStandardBomDetails(List<DetailStandardBomVo> modifyDetails);


}
